/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gpstracking.Utils.Geometry;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author jmj
 */
public class Polygon {
    public List<Point> points = new ArrayList<Point>();
    public int n;
    public Polygon( List<Point> points){
    	points = new ArrayList<Point>(points.size());
        Collections.copy(this.points, points);
        this.n = points.size();
    }

    public Polygon( int n) {
        this.points = new ArrayList<Point>( n );
        this.n = n;
    }
    public Point get( int idx){
        return points.get( idx ) ;
    }
    public void set( int idx, Point p){
        points.set( idx, p);
    }

    public void add(Point p) {
        points.add( p );
    }
    
}
